{template '_header'}
<link rel="stylesheet" type="text/css" href="../addons/ewei_shopv2/template/mobile/default/static/css/coupon.css?v=2.0.0">
<div class='fui-page  fui-page-current coupon-my-page'>
	<div class="fui-header">
		<div class="fui-header-left">
			<a class="back"></a>
		</div>
		<div class="title">我的优惠券</div>
		<div class="fui-header-right">&nbsp;</div>
	</div>
	<div class='fui-content'>

		<div class="coupon-headblock">
			<div class="top-layer"></div>
			<div class="line-layer"></div>
			<div class="bottom-layer"></div>
			<div class="gold"></div>
			<div class="link-text">请至【<a href="{php echo mobileUrl('sale/coupon/my')}">我的优惠券</a>】查看</div>
			<div class="paper">
				<div class="title">恭喜获得</div>
				<div class="text">
					<i class="d1"></i>
					<i class="d2"></i>
					<p class="t1"><span>{php echo count($coupons)}</span>张优惠券</p>
				</div>
				<i class="line"></i>
				<i class="dot-top"></i>
				<i class="dot-left"></i>
				<i class="dot-right"></i>
				<i class="dot-1"></i>
				<i class="dot-2"></i>
				<i class="dot-3"></i>
				<i class="dot-4"></i>
				<i class="dot-5"></i>
				<i class="dot-6"></i>
			</div>
		</div>



		{loop $coupons $coupon}

			<div class="coupon-groupblock">
				<div class="group-top">
					<div class="inner">
						<div class="left">{$coupon['title1']}</div>
						<div class="right">
							<p class="title">{$coupon['title3']}</p>
							<p class="subtitle">{$coupon['title2']}</p>
						</div>
					</div>
				</div>
				{if $coupon['coupontype']==0 &&count($coupon['goods'])>0}
				<div class="coupon-items">
					<div class="container1">
						{loop $coupon['goods'] $good}
							<a href="{php echo mobileUrl('goods/detail',array('id'=>$good['id']))}">
							<span class="item">
								<div class="image">
									<img src="{$good['thumb']}">
								</div>
								<div class="title">{$good['title']}</div>
								<div class="price">
									<div class="product">&yen;{$good['minprice']}</div>
									<div class="market">&yen;{$good['couponprice']} <span>用劵价</span></div>
								</div>
							</span>
						</a>
						{/loop}
						<span class="item">
							<a href="{php echo mobileUrl('sale/coupon/my/showcoupongoods',array('id'=>$coupon['id']))}"data-nocache="true" class="more" style="display: block;">
									查看更多>>
							</a>
						</span>
					</div>
				</div>
				{/if}
			</div>
		{/loop}

		<a href="{if empty($data['merchid'])}{php echo mobileUrl()}{else}{php echo mobileUrl('merch')}{/if}">
			<div class="btn btn-danger block" style="margin: 0 0.5rem 0.5rem">返回商城查看更多商品</div>
		</a>

		{template '_copyright'}
	</div>
</div>
{template '_footer'}